def count_sort(lyst, max_count=100):
    count = [0 for _ in range(max_count+1)]
    for val in lyst:
        count[val] += 1
    lyst.clear()
    for ind, val in enumerate(count):
        for i in range(val):
            lyst.append(ind)

if __name__ == "__main__":
    import random
    lyst = [i for i in range(100)]
    random.shuffle(lyst)
    print(lyst)
    count_sort(lyst)
    print(lyst)